home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 008a / perl40_2.zip / REGEXP.H < prev    next >
C/C++ Source or Header  |  1991-11-28  |  2KB  |  55 lines

  1. /*
  2.  * Definitions etc. for regexp(3) routines.
  3.  *
  4.  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  5.  * not the System V one.
  6.  */
  7.  
  8.  
  9. /* $RCSfile: regexp.h,v $$Revision: 4.0.1.2 $$Date: 91/11/05 18:24:31 $
  10.  *
  11.  * $Log:    regexp.h,v $
  12.  * Revision 4.0.1.2  91/11/05  18:24:31  lwall
  13.  * patch11: minimum match length calculation in regexp is now cumulative
  14.  * patch11: initial .* in pattern had dependency on value of $*
  15.  *
  16.  * Revision 4.0.1.1  91/06/07  11:51:18  lwall
  17.  * patch4: new copyright notice
  18.  * patch4: // wouldn't use previous pattern if it started with a null character
  19.  * patch4: $` was busted inside s///
  20.  *
  21.  * Revision 4.0  91/03/20  01:39:23  lwall
  22.  * 4.0 baseline.
  23.  *
  24.  */
  25.  
  26.  
  27. typedef struct regexp {
  28.     char **startp;
  29.     char **endp;
  30.     STR *regstart;        /* Internal use only. */
  31.     char *regstclass;
  32.     STR *regmust;        /* Internal use only. */
  33.     int regback;        /* Can regmust locate first try? */
  34.     int minlen;        /* mininum possible length of $& */
  35.     int prelen;        /* length of precomp */
  36.     char *precomp;        /* pre-compilation regular expression */
  37.     char *subbase;        /* saved string so \digit works forever */
  38.     char *subbeg;        /* same, but not responsible for allocation */
  39.     char *subend;        /* end of subbase */
  40.     char reganch;        /* Internal use only. */
  41.     char do_folding;    /* do case-insensitive match? */
  42.     char lastparen;        /* last paren matched */
  43.     char nparens;        /* number of parentheses */
  44.     char program[1];    /* Unwarranted chumminess with compiler. */
  45. } regexp;
  46.  
  47.  
  48. #define ROPT_ANCH 1
  49. #define ROPT_SKIP 2
  50. #define ROPT_IMPLICIT 4
  51.  
  52.  
  53. regexp *regcomp();
  54. int regexec();
  55.